
package com.scalar.chiptrack.operations.process.actions;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackAction;
import com.scalar.chiptrack.operations.process.forms.FabRecipeForm;




public final class FabRecipeAction extends ChipTrackAction {

    public FabRecipeAction() {
    }

    public ActionForward execute (ActionMapping mapping, 
                                  ActionForm form, 
                                  HttpServletRequest request, 
                                  HttpServletResponse response) throws Exception {

			 HttpSession ses = request.getSession(true);
			 
			 FabRecipeForm fabRecipeForm = (FabRecipeForm) form;

		
			 System.out.println("hey in FabRecipeaction");
			
			 //ArrayList vendorLocationList =new ArrayList();

			 ses.setAttribute("recipe",fabRecipeForm);
			 //request.setAttribute("vendorLocationList",vendorLocationList);
			 request.setAttribute("fabForm",ses.getAttribute("fabForm"));
			 request.setAttribute("vendorLocations",ses.getAttribute("vendorLocations"));
			 ses.removeAttribute("fabForm");
			 //ses.removeAttribute("vendorLocationList");
			 			
			 return (mapping.findForward("success")); 
	}
	
}